package cn.gok.jdkProxy;

/**
 * @author: chen fan
 * @since: 2022/11/9 11:38
 * @description:
 */
public class Test {
    public static void main(String[] args) {
        ITeacherService teacherService = new TeacherServiceImpl();

        //创建代理工具类对象，并且传入 委托类对象
        MyJdkProxy myJdkProxy = new MyJdkProxy(teacherService);

        //获取代理对象
        teacherService = (ITeacherService) myJdkProxy.getProxyInstance();
        teacherService.addStudent();

    }
}
